package tk.capkiller.sharelinks.biz;

public class StringIntegerPair {

	String str;
	Integer integer;

	public StringIntegerPair(String pStr, Integer pInteger) {
		str = pStr;
		integer = pInteger;
	}

	public String getStr() {
		return str;
	}

	public Integer getInteger() {
		return integer;
	}

	@Override
	public boolean equals(Object arg0) {
		if (arg0 == null) {
			return false;
		}
		if (!(arg0 instanceof StringIntegerPair)) {
			throw new IllegalArgumentException("cant compare " + arg0
					+ " whith StringIntegerPair");
		}
		StringIntegerPair value2 = (StringIntegerPair) arg0;
		return value2.getInteger().equals(this.getInteger())
				&& value2.getStr().equals(this.getStr());
	}

	@Override
	public String toString() {
		return str + " " + integer;
	}

}
